package main

import (
	"encoding/json"
	"fmt"
)

type person struct {
	Name string `json:"name"`
	Age  int    `json:"age"`
}

// 映射映射成结构体，利用反射将值附进去
func main() {
	var p person
	ingo := `{"name":"zhangsna1","age":99}`
	json.Unmarshal([]byte(ingo), &p)
	fmt.Println(p)
}
